x86/32on64: don't modify guest descriptors without need
authorJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2016 14:45:46 +0000 (16:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2016 14:45:46 +0000 (16:45 +0200)
commit82a9ae278ce6e76838066ab85bf0ace1d9e858bf
tree28453b4e5aa342ba8d35595ce0cc894efc0c1cac
parentcf415271e3151c9e807e2746c96839a76ad571da
x86/32on64: don't modify guest descriptors without need

System gates with type 0 shouldn't have what might be their DPL altered
- such descriptors can't be used anyway without incurring a #GP, and
hence adjusting its DPL is only risking to confuse the guest.

Also bail right away for non-present descriptors - no need to write
back anything in that case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/mm.c